Repository navigation
fix(C-0225): harden RBAC and preserve default account provisioning - #206
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
matthyx
left a comment
There was a problem hiding this comment.
Reviewed head 593f590 against main (74e4b2e). The change looks sound, but I can't approve it yet because CI is red on this commit and the new check never ran.
Blocker (CI/validation): main-policy-automation failed in ./scripts/run-all-control-tests.sh (C-0050 leaked its binding into later tests, the known #201 problem). #204 fixed that and merged on 2026-11-29, after this branch's base f29cc53; main has been green since. The workflow exits at that step, so the new "Test C-0225 namespace provisioning" step never ran. Please rebase onto current main and get a green run, including that step.
Nonblocking:
- The description should show the Before/After with the same command and input, for example the denied default ServiceAccount provisioning on
mainagainst the passing run on this PR. It currently only says it was reproduced. - The exemption now requires username
system:apiserverplussystem:mastersand the bootstrap label. That matches the apiserver loopback identity, so I found no issue. The fix is also covered by new tests for the group and bootstrap-label cases.
Other checks: #168 is the linked issue and no duplicate PR exists (#118, #127 and #162 are earlier, merged C-0225 work). The author has 3 open PRs (#205, #206, #207), which is at the policy limit. I did not run the tests locally; this is a static review plus CI log review.
Verdict: request changes. I expect to approve once CI is green on a rebased head.
Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004@gmail.com>
593f590 to
aae1f4f
Compare
matthyx
left a comment
There was a problem hiding this comment.
Re-reviewed head aae1f4f (rebased on current main 4bd6dec). The earlier blocker is resolved: main-policy-automation is green, including the new "Test C-0225 namespace provisioning" step, and DCO, CodeRabbit, GitGuardian and FOSSA are green. The system:apiserver + system:masters + bootstrap-label exemption, the new group denial and the companion mutating policy look sound, and the tests cover them. The description now includes verification and rebased validation. Validation here was static review plus CI results; I did not run tests locally.
Fixes #168.
Summary
automountServiceAccountToken: falserequirement. Add a companion mutating policy and binding that set the missing field on creation so the Kubernetes controller can provision the default account. Document installation on Kubernetes 1.36 and later and the webhook equivalent for older clusters.Verification
mainin kind with Kubernetes v1.36.1.git diff --check.Rebased validation
Rebased onto
main(4bd6dec), including the test cleanup fix, and pushed signed-off headaae1f4f. All 14 test-runner unit tests passed. On a disposable Kind Kubernetes v1.36.1 cluster with the PR policies active, creating a fresh namespace provisioned its default ServiceAccount and returned:The hosted full policy suite is a separate check.
Summary by CodeRabbit